﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

namespace PB.FBMembershipWebApp.Gen
{
    public partial class ErrorPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Exception exp = Server.GetLastError();
            StringBuilder sbText = new StringBuilder();
            if (exp != null)
            {

                Exception ex = exp;
                while (ex != null)
                {
                    sbText.Append("<br/>");
                    sbText.Append("<br/>Message: " + ex.Message);
                    sbText.Append("<br/>Stack Trace: " + ex.Source);
                    sbText.Append("<br/>Stack Trace: " + ex.StackTrace);
                    ex = ex.InnerException;
                }


            }
            else
            {
                sbText.Append("<br/>Some error has occured.");
            }

            ltlError.Text = sbText.ToString();
        }
    }
}
